home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / B-C / C++ FAQ Reference 1.0 / C++ FAQ Reference 1.0.rsrc / TEXT_1043.txt < prev    next >
Encoding:
Text File  |  1993-06-30  |  609 b   |  5 lines

  1. You can make your software more resilient to internal changes by realizing a class has two distinct interfaces for two distinct sets of clients:
  2.  * its 'public:' interface serves unrelated classes
  3.  * its 'protected:' interface serves derived classes
  4.  
  5. A class that is intended to have a long and happy life can hide its physical bits in its 'private:' part, then put 'protected:' inline access functions to these data.  The private bits can change, but if the protected access fns are stable, subclasses (ie: derived classes) won't break (though they'll need to be recompiled after a change to the base class).